package cn.redsoft.turingapi.msg;

import java.util.ArrayList;
import java.util.List;

public class NewsMsg extends BaseMsg {

	private List<NewsItem> list = new ArrayList<NewsMsg.NewsItem>();

	public NewsMsg() {
		this.msgType = TuringMsgType.news;
	}

	public List<NewsItem> getList() {
		return list;
	}

	public void setList(List<NewsItem> list) {
		this.list = list;
	}

	public static class NewsItem {
		protected String article;
		protected String source;
		protected String detailurl;
		protected String icon;

		public NewsItem() {
		}

		public NewsItem(String article, String source, String detailurl,
				String icon) {
			super();
			this.article = article;
			this.source = source;
			this.detailurl = detailurl;
			this.icon = icon;
		}

		public String getArticle() {
			return article;
		}

		public void setArticle(String article) {
			this.article = article;
		}

		public String getSource() {
			return source;
		}

		public void setSource(String source) {
			this.source = source;
		}

		public String getDetailurl() {
			return detailurl;
		}

		public void setDetailurl(String detailurl) {
			this.detailurl = detailurl;
		}

		public String getIcon() {
			return icon;
		}

		public void setIcon(String icon) {
			this.icon = icon;
		}

		@Override
		public String toString() {
			return "NewsItem [article=" + article + ", source=" + source
					+ ", detailurl=" + detailurl + ", icon=" + icon + "]";
		}
	}

	@Override
	public String toString() {
		return "NewsMsg [list=" + list + ", code=" + code + ", text=" + text
				+ ", msgType=" + msgType + "]";
	}

}
